package com.ifly.task.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "user")
public class User {

    @Id
    @Column(nullable = false, columnDefinition = "bigint comment '主键id'")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "user_name", columnDefinition = "varchar(128) COMMENT '人物名称'")
    private String userName;

    /**
     * 性别
     * 1:男 2:女 3:保密
     */
    @Column(name = "gender", columnDefinition = "int(4) DEFAULT 1 COMMENT '性别, 1:男 2:女 3:保密'")
    private Integer gender;

    /**
     * 人物所属类型
     */
    @Column(name = "type", columnDefinition = "int DEFAULT 11 COMMENT '人物所属类型'")
    private Integer type;

}
